Meaning of the word "any port in a storm" in English

What does "any port in a storm" mean in English? Explore the meaning, pronunciation, and specific usage of this word with Lingoland.

any port in a storm

US /ˈɛni pɔːrt ɪn ə stɔːrm/
UK /ˈɛni pɔːt ɪn ə stɔːm/
"any port in a storm" picture

Idiom

in a difficult or dangerous situation, one must accept any help or solution that is available, even if it is not ideal

Example:
The hotel was overpriced and dirty, but it was raining hard and we were exhausted—any port in a storm.
I don't really like this job, but I need the money to pay my rent; any port in a storm.